home *** CD-ROM | disk | FTP | other *** search
/ Aminet 7 / Aminet 7 - August 1995.iso / Aminet / comm / mebbs / lineid100.lha / LineID / Install_LineID next >
Text File  |  1995-01-16  |  4KB  |  134 lines

  1. ; $VER: LineID Install 1.00 (01.15.94) by Jason Gouger
  2.  
  3. (set source-dir (pathonly (expandpath @icon)))
  4.  
  5. (procedure install-exit
  6.     (complete 100)
  7.     (set @default-dest LineID-Dir)
  8.     (exit "Note: UserID significantly increases the speed of LineID.  Please see the documentation for more information.")
  9. )
  10.  
  11. (procedure select-destination-directory
  12.     (set destdir
  13.         (askdir
  14.             (prompt "In which drawer should "@app-name" be installed?") 
  15.             (help "You should install "@app-name" in the Doors Path defined in the MEBBSNet configuration.")
  16.             (default "DOORS:")
  17.            (newpath)
  18.         )
  19.     )
  20.     (set LineID-Dir(tackon destdir "LineID"))
  21. )
  22.  
  23. (procedure copy-LineID-text
  24.     (set Text-Dir(tackon LineID-dir "Text"))
  25.     (transcript "\nCopying LineID.[txt] files...\n")
  26.     (makedir(Text-Dir))
  27.     (copyfiles
  28.         (source (tackon source-dir "Text")) (dest Text-Dir)
  29.         (pattern "LineID.#?")
  30.         (files)
  31.         (if(= 1 install-icons) (infos))
  32.     )
  33. )
  34.  
  35. (procedure copy-LineID-prg
  36.     (copyfiles
  37.         (source source-dir) (dest LineID-Dir)
  38.         (pattern "LineID")
  39.         (files)
  40.     )
  41. )
  42.  
  43. (procedure copy-LineID-doc
  44.     (transcript "\nCopying documentation...\n")
  45.     (copyfiles
  46.         (source source-dir) (dest LineID-Dir)
  47.         (pattern "LineID.guide")
  48.         (files)
  49.         (if(= 1 install-icons) (infos))
  50.     )
  51.     (if ((exists "SYS:Utilities/MultiView")) 
  52.         (tooltype(
  53.             (dest (tackon LineID-Dir "LineID.guide"))
  54.             (setdefaulttool "SYS:Utilities/MultiView")
  55.         ))
  56.         (tooltype(
  57.             (dest (tackon LineID-Dir "LineID.guide"))
  58.             (setdefaulttool "SYS:Utilities/AmigaGuide")
  59.         ))
  60.     )
  61. )
  62.  
  63. (procedure add-LineID-logon
  64.     (if (askbool
  65.         (prompt "Would you like the "@app-name" door appended to your Logon.[txt] file(s)?")
  66.         (help "Selecting YES to this option will append the "@app-name" Door call to the "
  67.             "end of your Logon.[txt] file(s). followed by a 'Press return'."))
  68.         ((set logon-txt-dir
  69.             (askdir
  70.                 (prompt "In which drawer are the LogOn.[txt] file(s) located?") 
  71.                 (help "Select the directory in which the MEBBSNet text files are stored.")
  72.                 (default "MEBBSNet:Txt")
  73.                (newpath)
  74.             )
  75.         )
  76.  
  77.         (if (= 2 (exists logon-txt-dir))
  78.             ((set logon-text "\n~v!DOOR/")
  79.             (set logon-text (cat logon-text LineID-Dir))
  80.             (set logon-text (cat logon-text "/LineID#\n\n~vc\n"))
  81.  
  82.             (if (askbool
  83.                 (prompt "Are you sure you would like to have the following appended to "
  84.                           "your LogOn.[txt] file(s)?\n\n"logon-text)
  85.                 (help "Selecting YES to this option will ALTER your LogOn.[txt] file(s) "
  86.                         "so that "@app-name" will be executed upon logon."))
  87.                 ((foreach logon-txt-dir "(LogOn.txt|LogOn.gr#?)"
  88.                     ((set source-name (tackon logon-txt-dir @each-name))
  89.                     (textfile 
  90.                         (dest source-name) 
  91.                         (include source-name)
  92.                         (append logon-text)
  93.                         (prompt "Are you sure you would like to have the following appended to "
  94.                                   "the '"source-name"' file?\n\n"logon-text)
  95.                         (help "Selecting YES to this option will ALTER the '"source-name"' file "
  96.                                 "so that "@app-name" will be executed upon logon.")
  97.                         (confirm "Expert") 
  98.                     ))
  99.                 ))
  100.             )
  101.         ))
  102.     ))
  103. )
  104.  
  105. (procedure make-LineID-dir
  106.     (if(= 0 install-icons) (makedir(LineID-Dir)))
  107.     (if(= 1 install-icons) (makedir(LineID-Dir) (infos)))
  108. )
  109.  
  110. (procedure ask-install-icons
  111.     (set install-icons 0)
  112.     (if (askbool
  113.         (prompt "Would you like the icons installed for "@app-name"?")
  114.         (help "Selecting YES to this option will create the respective icons so that "
  115.                 "the directory and documentation may be accessed through WorkBench."))
  116.         ((set install-icons 1))
  117.     )
  118. )
  119.  
  120. (procedure LineID-full-install
  121.     (transcript "\nFull Installation...\n")
  122.     (complete 20) (ask-install-icons)
  123.     (complete 30) (make-LineID-dir)
  124.     (complete 50) (copy-LineID-prg)
  125.     (complete 70) (copy-LineID-text)
  126.     (complete 80) (copy-LineID-doc)
  127.     (complete 90) (add-LineID-logon)
  128.     (install-exit)
  129. )
  130.  
  131. (complete 00) (transcript "Installation script for " @app-name ".")
  132. (complete 10) (select-destination-directory)
  133. (LineID-full-install)
  134.